package com.fjh.repository;


import com.fjh.pojo.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TeacherRepository extends JpaRepository<Teacher, Long> {

    // 根据学科查询教师
    List<Teacher> findBySubject(String subject);

    // 根据学校查询教师
    List<Teacher> findBySchool(String school);

    // 根据登录 ID 查询教师
    Teacher findByLoginId(Long loginId);

    // 根据教师名称模糊查询
    List<Teacher> findByTeacherNameContaining(String teacherName);

}

